package com.zhihuiweijian.demo.service.impl;

import com.zhihuiweijian.demo.dao.RolePermissionMapper;
import com.zhihuiweijian.demo.model.RolePermission;
import com.zhihuiweijian.demo.service.RolePermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class RolePermissionServiceImpl implements RolePermissionService {

    @Autowired
    private RolePermissionMapper rolePermissionMapper;
    @Override
    public void insert(RolePermission record) {
        rolePermissionMapper.insert(record);
    }

    @Override
    public void delete(Long id) {
        rolePermissionMapper.delete(id);

    }

    @Override
    public void update(RolePermission record) {
        rolePermissionMapper.update(record);
    }

    @Override
    public List<RolePermission> selectByRole(String role) {
        return rolePermissionMapper.selectByRole(role);
    }

    @Override
    public List<RolePermission> findAll() {
        return rolePermissionMapper.findAll();
    }


}
